import 'package:json_annotation/json_annotation.dart';

part 'new_order.g.dart';

/// @Author lixiaobin
/// @Date 2024/1/29
/// @Description
@JsonSerializable(explicitToJson: true)
class WalletOrder {
  String? sameMonth;
  String? settlement;
  List<NewOrder>? newOrder;

  static WalletOrder fromJson(Map<String, dynamic> srcJson) =>
      _$WalletOrderFromJson(srcJson);

  Map<String, dynamic> toJson() => _$WalletOrderToJson(this);
}

@JsonSerializable(explicitToJson: true)
class NewOrder {
  int? totalFee;
  String? icon;
  String? payTime;
  SysOrder? sysOrder;
  String? id;
  String? subOrderNo;
  String? orderNo;
  int? deliverFee;
  String? codeUrl;
  String? supplierId;
  String? supplierName;
  String? timeStart;
  String? timeExpire;
  String? orderStatus;
  String? receiptTime;
  String? urgent;
  String? payWay;
  String? body;
  String? attach;
  String? payType;
  String? subMchId;
  String? shippingAddress;
  String? payServiceFee;
  String? serviceFee;
  String? deliverType;
  String? openId;
  String? deliverPhone;
  String? deliverName;
  String? promotionChannel;

  static NewOrder fromJson(Map<String, dynamic> srcJson) =>
      _$NewOrderFromJson(srcJson);

  Map<String, dynamic> toJson() => _$NewOrderToJson(this);
}

@JsonSerializable(explicitToJson: true)
class SysOrder {
  String? userName;
  String? orderTypeVal;

  static SysOrder fromJson(Map<String, dynamic> srcJson) =>
      _$SysOrderFromJson(srcJson);

  Map<String, dynamic> toJson() => _$SysOrderToJson(this);
}
